package com.powerManager.sdk.common;

import java.util.List;
import java.util.Map;

public class InitSystem {
	
	public static List<Map<String,Object>> menu = null;
	
	public static List<Map<String,Object>> dict = null;
	
	public static List<Map<String,Object>> button = null;
	
	public static List<Map<String,Object>> privilege = null;
	
	public static List<Map<String,Object>> roles = null;
	
	
	public static void loadMenu(){
		String sql = "select * from sys_menu";
		PagingResult pr = new PagingResult();
		try {
			menu = pr.noPaging(sql, null);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	
	public static void loadButton(){
		String sql = "select * from sys_button";
		PagingResult pr = new PagingResult();
		try {
			button = pr.noPaging(sql, null);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	
	public static void loadPrivilege(){
		String sql = "select * from sys_privilege";
		PagingResult pr = new PagingResult();
		try {
			privilege = pr.noPaging(sql, null);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	
	public static void loadRole(){
		String sql = "select * from sys_role";
		PagingResult pr = new PagingResult();
		try {
			privilege = pr.noPaging(sql, null);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

}
